//
//  SEConfirmReserveInfoCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/7.
//

import UIKit

class SEConfirmReserveInfoCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .background
        contentView.backgroundColor = .background
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    func updateWithViewModel(_ viewModel: SEHospitalizeOrderDetailViewModel, atIndexPath indexPath: IndexPath) {
        switch indexPath.row {
        case 0:
            titleLabel.text = "病情描述"
            descLabel.text = viewModel.model.illness
        case 1:
            titleLabel.text = "过敏史"
            descLabel.text = viewModel.model.allergicContent
        case 2:
            titleLabel.text = "既往史"
            descLabel.text = viewModel.model.pastHistory
        default:
            break
        }
    }
    
    @IBOutlet private weak var containerView: UIView!
    @IBOutlet private weak var titleLabel: UILabel!
    @IBOutlet private weak var descLabel: UILabel!
    
}
